package com.zhang.gulimall.product.vo;

import com.zhang.gulimall.product.entity.*;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {

    //1.sku基本信息
    private SkuInfoEntity skuInfo;
    //2.sku图片信息
    private List<String> skuImg;
    //3.spu销售属性组合
    private List<SkuItemSaleAttrVo> skuSaleAttr;
    //4.spu介绍
    private SpuInfoDescEntity spuInfoDesc;
    //5.spu规格参数
    private List<SpuItemAttrGroup> attrGroups;
    //6.库存
    private boolean hasStock = true;

    @Data
    public static class SpuItemAttrGroup {
        private String groupName;
        private List<AttrEntity> attrs;
    }

    @Data
    public static class SkuItemSaleAttrVo {
        private String attrId;
        private String attrName;
        private List<AttrValueWithSkuIds> attrValues;
    }

    @Data
    public static class AttrValueWithSkuIds {
        private String attrValue;
        private List<String> skuIds;
    }

}
